import {createObjectPicker} from "../../packages/utils/createObjectPicker";
import {Plc, PlcImage} from "plain-ui";

export const PickProduct = createObjectPicker({
  showKey: 'name',
  map: { name: 'normalText', id: 'id', image: 'imageId', price: 'numberVal' },
  config: {
    url: '/demo',
    bodyRowHeight: 70,
    render: () => <>
      <PlcImage title="商品图片" field="imageId"/>
      <Plc title="商品名称" field="normalText"/>
      <Plc title="商品价格" field="numberVal"/>
      <Plc title="编号id" field="id"/>
    </>
  },
});
